package cn.z2huo.knowledge.basic.arrays.arraysclass.toarray;

import java.util.Arrays;
import java.util.List;

/**
 * <p>
 *
 * @author z2huo
 */
class ToArrayTest {

    public static void main(String[] args) {
        String[] arr = {"a", "b", "c"};
        List<String> list = Arrays.asList(arr);
        System.out.println(list);
        System.out.println();

        Object[] array = list.toArray();
        System.out.println(Arrays.toString(array));
        System.out.println();

        arr[0] = "aa";
        System.out.println(list);
        list.set(1, "bb");
        System.out.println(list);
        System.out.println();

        System.out.println(Arrays.toString(array));
    }

}
